<%@codepage="65001"%>
<%session.codepage="65001"%>
<!-- #include virtual=/inc/dbConn.asp -->
<!-- #include virtual=/inc/function.asp -->
<!-- #include virtual=/inc/action.header.inc.asp -->

<%
	'## 파라미터 변수 선언부
	income				= Request("income")
	memo				= Request("memo")
	incomeDt			= Request("incomeDt")
	amount			= Request("amount")
	orgAmount		= Request("orgAmount")
	tax					= Request("tax")
	accountCd		= Request("accountCd")
	compCd			= Request("compCd")
	seq					= Request("seq")
	part					= Request("part")
	flag					= Request("flag")
	billCd				= Request("billCd")
	billMemo			= Request("billMemo")
		
	incAmount		= Request("incAmount")
	actionDt			= Request("actionDt")
	bankDt				= Request("bankDt")
	incSeq				= Request("incSeq")
	incMemo			= Request("incMemo")
	incFlag				= Request("incFlag")

	memo			= Replace(memo,"'","''")
	incMemo		= Replace(incMemo,"'","''")
	billMemo		= Replace(billMemo,"'","''")
	incAmount		= Replace(incAmount,",","")
	amount		= Replace(amount,",","")
	orgAmount		= Replace(orgAmount,",","")
	If tax = "" Then tax = 0 End If 	
	tax		= Replace(tax,",","")
	
	If billCd = "" Then billCd = 0 End If 
	If incAmount = "" Then incAmount = 0 End If 
	If compCd = "" Then compCd = 0 End If 
	If seq = "" Then seq = 0 End If 
	If incSeq = "" Then incSeq = 0 End If 

	accessId = Request.Cookies("S_uid")

	SQLTitle = "-- ■■■■ 회계(입금) 저장 ■■■■"
	SQL = "exec spIncome '" & income & "', '" & incomeDt & "', " & accountCd & ", '" & memo & "', '" & amount & "', '" & orgAmount & "', '" & tax & "', '" & accessId & "', " & seq & ", " & compCd & ", '" & flag & "', " & billCd & ", "
	SQL 	= SQL & "'" & billMemo & "', '" & part & "', " & incAmount & ", '" & actionDt & "', '" & bankDt & "', '" & incMemo & "', '" & incFlag & "', " & incSeq


	If xMode="debug" Then 
		Call showDebug(SQLTitle,SQL) 
	End If 

'Response.write SQL
'Response.end
	DbCon.Execute SQL

	Call rsWithXML("Save OK!")
%>